/*
 * @Author: lijian
 * @Date: 2022-10-12 13:59:04
 * @LastEditors: lijian
 * @LastEditTime: 2022-11-15 17:01:57
 * @Description: 
 */
const Router = require("koa-router");
const { getClientIP } = require('../utils/ip')

const {
  list,
  params,
  productDetail,
  Guarantee
} = require("../controller/temp.controller.js");

const tempRouter = new Router({ prefix: "/pm-proposal-mid" });

tempRouter.get('/test', async ctx => {
  const ip = getClientIP(ctx)
  ctx.success({ ip })
})
tempRouter.get("/proposals/singleItem",productDetail);
tempRouter.get("/proposals/list",list);
tempRouter.post("/dict/plan/param",params);
tempRouter.get("/proposals/init",Guarantee);

module.exports = tempRouter;
